<template>
  <div>
    <el-form :model="form" ref="form" label-width="180px">
      <el-row>
        <el-col :span="12">
          <el-form-item label="推广名称">
            <el-input v-model="form.extensionName"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="第二文本标题">
            <el-input v-model="form.secondText"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="第三文本标题">
            <el-input v-model="form.thirdTest"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="类型">
            <el-select v-model="form.type" placeholder="请选择">
              <el-option
                v-for="item in extensionData"
                :key="item.itemValue"
                :label="item.itemText"
                :value="item.itemValue"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-col :span="24">
              <el-button type="primary" @click="subim">提交</el-button>
          </el-col>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import {postCoreSave} from "../../assets/js/api"
export default {
  name: "ExtensionDia",
  props: ["form","extensionData"],
  data() {
    return {};
  },
  methods:{
      subim() {
          
          postCoreSave(this.form).then(res => {
              this.$emit("closeDia", false);
              if(res.code == 200) {
                  this.$message.success(res.message)
              } else {
                  this.$message.error(res.message)
              }
          })
      }
  }
};
</script>
<style scoped type="less">
</style>